server {
    listen 80;
    server_name top.technologycloud.net;

    default_type 'text/html';
    charset utf-8;
    lua_code_cache off;  

    location / {
        default_type 'text/plain';

        lua_code_cache off;  
        content_by_lua_file /opt/andrew_git/openresty_controller/lua/top_diversion.lua;  
    }

    location @wx {
        default_type 'text/plain';
        rewrite ^(.*)$ /wx/$1 last;
    }

    location @sz {
        default_type 'text/plain';
        rewrite ^(.*)$ /sz/$1 last;
    }

    location @no_ct {
        default_type 'text/plain';
        content_by_lua_block {
            ngx.say('404:top域名请显式指定token')
        }  
    }

    location /sz/
    {
        internal;
        alias /opt/andrew_git/openresty_controller/web/community/sz/;
    }

    location /wx/
    {
        internal;
        alias /opt/andrew_git/openresty_controller/web/community/wx/;
    }
}  